import React from "react";
import axios from 'axios';
import './App.css';
//(1)案例todolist
// import {NavLink, Route, Redirect} from 'react-router-dom';
// import Mylink from "./components/MyLink/Mylink";
// import Header from "./components/Header";//文件名叫index.jsx则可以省略Hello的最后一层
// import List from "./components/List";
// import Footer from "./components/Footer";

//(2)引入路由组件
// import RouterHeader from './routerHeader';
// import About from "./pages/About";
// import Home from "./pages/Home";
// import { Switch } from "react-router-dom/cjs/react-router-dom.min";

//(3)引入antd组件库
// import Antd from "./components/Antd";

//(4)redux的基本使用
import Count from "./components/Redux/Count";

//创建并暴露app组件
export default class App extends React.Component {
  getSudentData = () => {
    axios.get('http://localhost:3001/api1/search/users2').then(
      response => {console.log('获取数据成功', response.data)},
      error => {}
    )
  }

  render() {
    return (
      // <div className="todo-container">
      //   <div className="todo-wrap">
      //     <Header />
      //     <List />
      //     <Footer/>
      //     <button onClick={this.getSudentData}>获取学生信息</button>
      //   </div>
      // </div>

      // <div>
      //   <RouterHeader />
      //   <div className="row">
      //     <div className="col-xs-2 col-xs-offset-2">
      //       <div className="list-group">
      //         <Mylink>传递一个标签体</Mylink>
      //         {/* <a className="list-group-item" href="./about.html">About</a>
      //         <a className="list-group-item active" href="./home.html">Home</a> */}
      //           <NavLink activeClassName="haha" className="list-group-item" to="/about" children="About"></NavLink>
      //           <NavLink activeClassName="haha" className="list-group-item" to="/home">Home</NavLink>
      //       </div>
      //     </div>
      //     <div className="col-xs-6">
      //       <div className="panel">
      //         <div className="panel-body">
      //           <Switch>
      //             <Route path="/about" component={About}></Route>
      //             <Route path="/home" component={Home}></Route>
      //             <Redirect to="/about"></Redirect>                  
      //           </Switch>
      //         </div>
      //       </div>
      //     </div>
      //   </div>
      // </div>
      
      <div>
        {/* <Antd /> */}
        <Count />
      </div>
    );
  }
}
